﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Specialized;

public partial class Navi : System.Web.UI.Page
{
#region +CONSTANT+
    const int _RQT_DANGNHAP = 1;
    const int _RQT_DANGKY = 2;
    const int _RQT_RESETMATKHAU = 3;

    const int _SESSION_INDEX_ISLOGIN = 0;
    const int _SESSION_INDEX_USERNAME = 1;
    const int _SESSION_INDEX_USERTYPE = 2;
#endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write(Request.Params["rqt"]);
        int rqt = int.Parse(Request.Params["rqt"]);
        if (rqt == _RQT_DANGNHAP) {
            setLogin();
        }
    }

    bool isHavePermission() {
        return true;
    }

    void setLogin() {
        Session[_SESSION_INDEX_ISLOGIN] = true;
        NameValueCollection frmlogin = Request.Form;
        Response.Write(frmlogin.Count);
    }

    void setLogout() {
        Session[_SESSION_INDEX_ISLOGIN] = false;
    }
}
